import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        System.out.println("请输入身份证号");//321281202001011234
        Scanner sc = new Scanner(System.in);
        String identityCard = sc.next();
        String year = identityCard.substring(6,10);
        String month = identityCard.substring(10,12);
        String day = identityCard.substring(12,14);
        char temp = identityCard.charAt(16);
        int num = temp - '0';
        String gender;
        if(num % 2 == 0)
            gender = "女";
        else
            gender = "男";
        System.out.println("生日为"+year+"年"+month+"月"+day+"日"+",性别"+gender);
    }
}